Conventionally, there is a game where a user operates a mobile hand-held terminal (hand-held game apparatus) while holding it, and an event is executed in accordance with the attitude and the position of the mobile hand-held terminal in real space. The mobile hand-held terminal includes a sensor that detects the position and the attitude of the mobile hand-held terminal in real space, and the user of the terminal advances the game by moving the mobile hand-held terminal and changing the attitude of the mobile hand-held terminal. For example, in accordance with the attitude of the mobile hand-held terminal in real space, the mobile hand-held terminal scrolls an image displayed on a display screen of the mobile hand-held terminal. Then, a scope is displayed at the center of the display screen of the mobile hand-held terminal, so that when a predetermined button of the mobile hand-held terminal has been pressed in the state where a virtual object (e.g., an insect object) is included in the scope, it is considered that the virtual object has been caught in the scope.
To change the point of view toward an image of a virtual world displayed on the display screen, however, the mobile hand-held terminal needs to scroll the image on the basis of the attitude of the mobile hand-held terminal. Accordingly, to shift the point of view toward the virtual world, the mobile hand-held terminal needs to be moved. This may make it difficult for the user to operate the mobile hand-held terminal. For example, to significantly shift the point of view toward the virtual world, the mobile hand-held terminal also needs to be moved significantly. This requires the user to make a large motion, and additionally, if the real space where the mobile hand-held terminal can be moved is limited, it may not be possible to shift the point of view to the position desired by the user.
Therefore, it is an object of the exemplary embodiment to provide a storage medium having stored thereon an information processing program capable of, when the point of view toward an image displayed on an apparatus changes on the basis of the motion and the attitude of the apparatus body, further facilitating the operation of changing the point of view, and an information processing apparatus, an information processing system, and an information processing method that are capable of, when the point of view toward an image displayed on an apparatus changes on the basis of the motion and the attitude of the apparatus body, further facilitating the operation of changing the point of view.
To achieve the above object, the exemplary embodiment may employ, for example, the following configurations. It is understood that when the description of the scope of the appended claims is interpreted, the scope should be interpreted only by the description of the scope of the appended claims. If the description of the scope of the appended claims contradicts the description of these columns, the description of the scope of the appended claims has priority.
In an exemplary configuration of a computer-readable storage medium having stored thereon an information processing program according to the exemplary embodiment, the information processing program is executed by a computer of an information processing apparatus capable of displaying an image on a portable display apparatus that outputs at least body state data based on an attitude and/or a motion of the portable display apparatus body and touch position data based on a touch position on a touch panel provided in the portable display apparatus. The information processing program causes the computer to execute: controlling, on the basis of the body state data and the touch position data, an attitude and/or a position of a first virtual camera for generating an image of a virtual world; and displaying on the portable display apparatus a first image representing the virtual world viewed from the first virtual camera.
It should be noted that the information processing apparatus may be an apparatus that performs game processing and generates an image based on the game processing, or may be a versatile apparatus such as a general personal computer. The portable display apparatus may have a size small enough to be carried by a user. Typically, the portable display apparatus may be a display apparatus that allows the user to view an image displayed thereon by holding it with both hands. Further, as in a terminal apparatus according to the embodiment described later, the portable display apparatus may or may not include components other than: means for outputting at least data based on the attitude and/or the motion of the portable display apparatus body; means for outputting touch position data based on a touch position on a touch panel provided on a surface of a display screen of the portable display apparatus; and a display screen that displays the first image.
Based on the above, when the point of view toward an image displayed on the portable display apparatus changes on the basis of the motion and the attitude of the portable display apparatus body, the point of view can be changed also by a touch operation. This further facilitates the operation of a user changing the point of view. For example, even when it is desired to significantly shift the point of view in the virtual world, it is possible to significantly shift the point of view by the touch operation. This eliminates the need for the operation of significantly moving the portable display apparatus body to shift the point of view.
In addition, the information processing program may further cause the computer to execute calculating the attitude and/or the motion of the portable display apparatus on the basis of the body state data. In this case, the attitude and/or the position of the first virtual camera may be controlled on the basis of the calculated attitude and/or motion of the portable display apparatus and the touch position indicated by the touch position data.
Based on the above, it is possible to calculate the attitude and/or the motion of the portable display apparatus using the body state data output from the portable display apparatus, and control the attitude and/or the position of the first virtual camera on the basis of the attitude and/or the motion of the portable display apparatus.
In addition, the attitude of the first virtual camera may be controlled on the basis of the attitude and/or the motion of the portable display apparatus such that the first virtual camera rotates relative to the virtual world, and the position of the first virtual camera may be controlled, on the basis of the touch position indicated by the touch position data, such that the first virtual camera moves relative to the virtual world.
Based on the above, the user can perform various operations such as: causing the first virtual camera to rotate relative to the virtual world, by performing the operation based on the attitude and/or the motion of the portable display apparatus body; and causing the first virtual camera to move relative to the virtual world, by performing the touch operation on the touch panel provided on a display screen of the portable display apparatus.
In addition, the attitude of the first virtual camera may be controlled on the basis of the attitude and/or the motion of the portable display apparatus such that the first virtual camera rotates relative to an object placed in the virtual world, and the position of the first virtual camera may be controlled, on the basis of the touch position indicated by the touch position data, such that the first virtual camera moves relative to the object.
Based on the above, when the point of view toward the object displayed on the portable display apparatus changes on the basis of the motion and the attitude of the portable display apparatus body, the point of view can be changed also by the touch operation. This makes it possible to further facilitate the operation of changing the point of view from which the user views the object. For example, even when it is desired to significantly move the range in which the object is displayed on the display screen, it is possible to significantly move the display range by the touch operation. This eliminates the need for the operation of significantly moving the portable display apparatus body to move the display range.
In addition, the information processing program may further cause the computer to execute controlling, on the basis of the calculated attitude and/or motion of the portable display apparatus and the touch position indicated by the touch position data, an action of a player object placed in the virtual world. In this case, the first virtual camera may be placed at a position of generating an image of the virtual world, the image including at least the player object.
Based on the above, it is possible to perform the operation of changing the attitude and/or the position of the first virtual camera, and simultaneously perform the operation of controlling the action of the player object.
In addition, the first virtual camera may be placed at a position of looking down from directly above the player object in the virtual world.
Based on the above, it is possible to display on the portable display apparatus an image obtained by looking down upon the player object placed in the virtual world.
In addition, an attitude of the player object may be controlled on the basis of the attitude and/or the motion of the portable display apparatus such that the player object rotates relative to the virtual world about a vertical direction in the virtual world, in the same direction of rotation and by the same angle of rotation as a direction of rotation and an angle of rotation of the first virtual camera. A position of the player object may be controlled, on the basis of the touch position indicated by the touch position data, such that the player object moves relative to the virtual world in the same moving direction and at the same moving distance as a moving direction and a moving distance of the first virtual camera.
Based on the above, the attitude and/or the position of the player object change in a similar manner to changes in the attitude and/or the position of the first virtual camera. This makes it possible to generate an image in which the player object is displayed always in the same state on the display screen of the portable display apparatus. Further, the display of the player object always in the same state on the display screen enables an intuitive and easy operation of controlling the action of the player object on the basis of the attitude and/or the motion of the portable display apparatus body, and also on the basis of the touch position.
In addition, the information processing program may further cause the computer to execute calculating, on the basis of the touch position data, a displacement of the touch position input to the touch panel. In this case, the first virtual camera may be controlled on the basis of the displacement of the touch position so as to move relative to the virtual world.
Based on the above, it is possible to cause the first virtual camera to move relative to the virtual world, by performing the operation of changing the touch position on the touch panel, such as a drag operation performed on the touch panel.
In addition, a moving direction in which the first virtual camera is to be caused to move may be calculated on the basis of a direction of the displacement of the touch position, and the first virtual camera may be controlled so as to move relative to the virtual world in the moving direction.
Based on the above, the moving direction of the first virtual camera is set on the basis of the direction in which the touch position on the touch panel is changed. This makes it possible to cause the first virtual camera to move relatively in the direction desired by the user.
In addition, a direction opposite to the direction of the displacement of the touch position may be calculated as the moving direction.
In addition, a direction opposite to a direction that corresponds to the direction of the displacement and is included in the virtual world displayed so as to overlap the displacement of the touch position may be calculated as the moving direction.
Based on the above, the first virtual camera moves in the direction opposite to the direction in which the touch position on the touch panel is changed, and the virtual world displayed on the display screen is scrolled so as to follow the moving direction of the touch position on the touch panel. This makes it possible to perform the operation of shifting the point of view in an intuitive manner.
In addition, a moving distance at which the first virtual camera is to be caused to move may be calculated on the basis of an amount of the displacement of the touch position, and the first virtual camera may be controlled so as to move relative to the virtual world at the moving distance.
Based on the above, the moving distance of the first virtual camera is set on the basis of the amount of change in the touch position on the touch panel. This makes it possible to cause the first virtual camera to move relatively at the distance desired by the user.
In addition, a distance corresponding to the amount of the displacement and included in the virtual world displayed so as to overlap the displacement of the touch position may be calculated as the moving distance.
Based on the above, it is possible to cause the first virtual camera to move relatively at the same distance as the amount of change in the touch position on the touch panel. This makes it possible to perform the operation of shifting the point of view in an intuitive manner.
In addition, at least an attitude and/or a motion of the portable display apparatus that are obtained by rotating the portable display apparatus about a perspective direction of, and perpendicular to, a display screen of the portable display apparatus may be calculated. The attitude of the first virtual camera may be controlled in accordance with the attitude and/or the motion of the portable display apparatus that are obtained by rotating the portable display apparatus about the perspective direction.
Based on the above, it is possible to change the attitude of the first virtual camera by moving the portable display apparatus so as to rotate (roll) about the perspective direction of the display screen of the portable display apparatus.
In addition, the attitude of the first virtual camera may be controlled such that in accordance with a direction of rotation in which the portable display apparatus rotates about the perspective direction, the first virtual camera rotates relative to the virtual world about a direction of a line of sight of the first virtual camera and in the direction of rotation.
Based on the above, when the portable display apparatus has been moved so as to rotate (roll) about the perspective direction of the display screen of the portable display apparatus, the first virtual camera rotates relatively about the direction of the line of sight in the same direction as the direction of rotation of the display screen. This makes it possible to display an image as if peeping at the virtual world through the display screen of the portable display apparatus.
In addition, the attitude of the first virtual camera may be controlled such that the first virtual camera rotates relative to the virtual world, in accordance with an angle by which a facing direction of the portable display apparatus body changes about the perspective direction.
Based on the above, the user can control the attitude of the first virtual camera by changing the direction of the portable display apparatus.
In addition, the attitude of the first virtual camera may be controlled such that the first virtual camera rotates relative to the virtual world by the same angle as the angle by which the facing direction of the portable display apparatus body changes.
Based on the above, it is possible to cause the first virtual camera to rotate relatively by the same angle as the angle by which the attitude and/or the position of the portable display apparatus is changed.
In addition, the attitude of the first virtual camera may be controlled such that in accordance with a direction of rotation and an angle of rotation in and by which the portable display apparatus rotates about the perspective direction, the first virtual camera rotates relative to the virtual world about a direction of a line of sight of the first virtual camera in the direction of rotation and by the angle of rotation; and when the touch position data indicates an operation of dragging the touch panel, the position of the first virtual camera may be controlled such that in accordance with a moving direction and a moving distance of the touch position in the virtual world displayed on the display screen so as to overlap the touch position indicated by the touch position data, the first virtual camera moves relative to the virtual world along a plane perpendicular to the direction of the line of sight in a direction opposite to the moving direction and at the moving distance.
Based on the above, when the portable display apparatus has been moved so as to rotate (roll) about the perspective direction of the display screen of the portable display apparatus, the first virtual camera rotates relatively about the direction of the line of sight in the same direction and by the same angle as the direction of rotation and the angle of rotation of the display screen. This makes it possible that even when the display screen of the portable display apparatus has rotated, the virtual world displayed on the display screen is always displayed in the same direction in real space. Further, when a drag operation has been performed on the touch panel of the portable display apparatus, it is possible to display the virtual world, displayed on the display screen, by causing the virtual world to move so as to follow the drag operation.
In addition, the information processing program may further cause the computer to execute acquiring data based on a load applied to a load detection device. In this case, a position of the player object may be controlled on the basis of the acquired data such that the player object moves relative to the virtual world.
It should be noted that the load detection device may be, as an example, a device that detects a load applied to the load detection device with at least a part of the user's body placed thereon, and is turned on/off in accordance with the load. Such a device may be: one operated by the user mounted thereon with both soles in surface contact with the top surface of the device; one operated by the user with only one foot placed on the top surface of the device; one operated by the user with another part of the body (e.g., a hand) placed on the device; or the like.
Based on the above, it is also possible to cause the player object to move by the operation performed by the user using the load detection device. This enables the user to perform the operation of causing the player object to move using the load detection device, while adjusting the point of view by moving the portable display apparatus while viewing the first image on the portable display apparatus, and by operating the touch panel. This enables the user to perform an operation in an unprecedented operation environment.
In addition, the portable display apparatus may include at least one of a gyro sensor and an acceleration sensor. The attitude and/or the motion of the portable display apparatus may be calculated on the basis of data output from the at least one of the gyro sensor and the acceleration sensor.
Based on the above, using the data that is output from the gyro sensor and indicates the angular velocity generated in the portable display apparatus and/or the data that is output from the acceleration sensor and indicates the acceleration generated in the portable display apparatus, it is possible to accurately calculate the attitude and the motion of the portable display apparatus.
In addition, image data indicating the first image may be output to the portable display apparatus. The portable display apparatus may include an image data acquisition unit that acquires the image data output from the information processing apparatus. A display screen of the portable display apparatus may display the first image indicated by the image data acquired by the image data acquisition unit.
Based on the above, the portable display apparatus can function as a so-called thin-client terminal, which does not perform information processing such as game processing.
In addition, the information processing program may further cause the computer to execute generating compression image data by compressing the image data indicating the first image. In this case, the generated compression image data may be output to the portable display apparatus. The image data acquisition unit may acquire the compression image data output from the information processing apparatus. The portable display apparatus may further include a display image decompression unit that decompresses the compression image data to obtain the image data indicating the first image. The display screen of the portable display apparatus may display the first image indicated by the image data that has been acquired by the image data acquisition unit and has been decompressed by the display image decompression unit.
Based on the above, the first image is decompressed before being output from the information processing apparatus to the portable display apparatus. This makes it possible to output the first image at a high speed, and reduce delay caused between the generation of the first image and the display of the first image on the portable display apparatus.
In addition, besides the first image, a second image representing the virtual world viewed from a second virtual camera may be further displayed on another display apparatus connected to the information processing apparatus.
It should be noted that said another display apparatus described above is a display apparatus connected to the information processing apparatus, like a monitor 2 according to the embodiment described later. Said another display apparatus may be a component separate from the portable display apparatus, and may be any apparatus so long as it is capable of displaying the second image generated by the information processing apparatus. For example, said another display apparatus described above may be integrated with the information processing apparatus (in a single housing).
Based on the above, when processing based on the operation of moving the portable display apparatus and the touch operation is performed, it is possible to display the results of the processing not only on the portable display apparatus but also on said another display apparatus connected to the information processing apparatus. This enables the user to use, in accordance with the state of the operation or the user's preference, either one of images displayed on, for example, two apparatuses, and also view an image suitable for an operation of the user. Further, it is possible to use an image displayed on said another display apparatus connected to the information processing apparatus, as, for example, an image to be viewed by another person different from the user. This makes it possible to provide a viewing environment suitable also for the case where a plurality of people view the results of the processing.
In addition, the information processing program may further cause the computer to execute generating compression image data by compressing the image data indicating the first image. In this case, the generated compression image data may be output to the portable display apparatus, and, besides the compression image data, image data indicating the second image may be output to said another display apparatus without being compressed. The portable display apparatus may include: an image data acquisition unit that acquires the compression image data output from the information processing apparatus; and a display image decompression unit that decompresses the compression image data to obtain the image data indicating the first image. A display screen of the portable display apparatus may display the first image indicated by the image data that has been acquired by the image data acquisition unit and has been decompressed by the display image decompression unit.
Based on the above, the first image is decompressed and then output from the information processing apparatus to the portable display apparatus. This makes it possible to output the first image at a high speed, and reduce delay caused between the generation of the first image and the display of the first image on the portable display apparatus.
In addition, the information processing program may further cause the computer to execute setting the second virtual camera at a position different from the position of the first virtual camera, and controlling an attitude and/or a position of the second virtual camera.
Based on the above, the same virtual world is displayed not only on the portable display apparatus but also on said another display apparatus, and images of the virtual world that are different in the point of view are displayed thereon. This enables the user to use, in accordance with the state of the operation or the user's preference, either one of the images displayed on the two apparatuses when performing an operation.
In addition, a direction of a line of sight of the second virtual camera may be set to be parallel to a direction of a line of sight of the first virtual camera, and the second virtual camera may be set behind the first virtual camera. A range wider than a range of the virtual world represented by the first image may be displayed as the second image on said another display apparatus.
Based on the above, an image of the virtual world in a display range wider than that of an image of the virtual world displayed on the portable display apparatus is displayed on said another display apparatus connected to the information processing apparatus. This makes it possible to display on each display apparatus, for example, an image suitable for an operation of the user when the state of the virtual world is presented to the user.
In addition, a direction of a line of sight of the first virtual camera may be set to a vertical direction in the virtual world. A direction of a line of sight of the second virtual camera may be set to the vertical direction in the virtual world.
Based on the above, the same virtual world is displayed not only on the portable display apparatus but also on said another display apparatus, and images of the virtual world obtained by viewing it from a bird's-eye view are displayed on the portable display apparatus and said another display apparatus. This makes it possible to display on each display apparatus, for example, an image suitable for an operation of the user when the state of the virtual world is presented to the user.
In addition, the exemplary embodiment may be carried out in the forms of an information processing apparatus and an information processing system, each including units that perform the above processes, and an information processing method including the above operations.
The exemplary embodiment makes it possible to, when the point of view toward an image displayed on a portable display apparatus changes on the basis of the motion and the attitude of the portable display apparatus body, further facilitate the operation of changing the point of view.
These and other objects, features, aspects and advantages of the exemplary embodiment will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.